{# Template for home page of user #}
{% extends "home_base.html" %}

{% spaceless %}



{% block newgroup %}
{% if user.is_authenticated %}
<div class="form">
	<form action="/creategroup/" method="post" enctype="multipart/form-data">
	  <table>
		{{ grpForm }}
	  </table>
	  <input type="submit" value="Create" />
	</form>
</div>
{% endif %}
{% endblock newgroup%}

{% block entries%}

<h2 id="latestgroups">Groups: </h2>
<table class="grouptable"><tbody>
    {% for grp in query_list %}
	<tr class="solrow">
		<td class="groupentry">
			<a href="{{ grp.get_absolute_url }}"> {{ grp.desc }} </a>
		</td>
	</tr>
    {% endfor %}
</tbody></table>
{% endblock entries%}

{% block paginate %}
<div class="paginate">
{% if has_previous %}
	<a href='/u/{{u_id}}/p/{{ previous_page }}'>Previous</a>
	{% if has_next %} | {% endif %}
{% endif %}

{% if has_next %} <a href='/u/{{ u_id }}/p/{{ next_page }}/'>Next</a>  {% endif %}
</div>
{% endblock paginate %}
{% endspaceless %}